package com.example.myannotation;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Switch;

import com.example.reflect.InjectUtil;
import com.example.reflect.OnClick;
import com.example.reflect.OnLongClick;

public class MainActivity2 extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        InjectUtil.bind(this);

    }
    @OnClick({R.id.btn1, R.id.btn2,R.id.btn3})
    public boolean longClick(View view) {

        switch (view.getId()) {
            case R.id.btn1:
                Log.i("MainActivity", "one");
                break;
            case R.id.btn2:
                Log.i("MainActivity", "two");
                break;
            case R.id.btn3:
                Log.i("MainActivity", "three");
                break;

        }

        return true;
    }
}